<template>
  <div class="pc-list-demo">
    <pc-table :data="data" :headerData="tableConfig.headerData"/>
  </div>
</template>

<script lang="ts" setup>
const data: string[] = []

const tableConfig = {
  headerData: [
    {label: '表头', key: '0'},
    {label: '表头', key: '1'},
    {
      label: '表头', children: [
        {label: '表头', key: '2'},
        {label: '表头', key: '3'},
        {label: '表头', key: '4'},
      ]
    },
  ]
}

const getList = () => {
  for (let i = 0; i <= 99999; i++) {
    const row = {}
    for (let j = 0; j <= 4; j++) {
      row[j] = `数据${i + 1}`
    }
    data.push(row);
  }
};

getList()
</script>

<style scoped>
.pc-list-demo {
  width: 100%;
  height: 260px;
}
</style>
